import util from '@/libs/util';
import store from '@/store';
import router from '@/router';

//  大屏授权
function screenAuthResHandle (msg) {
    util.storage.set('token', msg.content.token)
    router.push('/');
}

// 更新队列
function queueListScreenResHandle (msg) {
    store.dispatch('websocket/websocketfun/setPatient', msg.content);
}

// 呼叫
function queueCallScreenResHandle (msg) {
    store.dispatch('websocket/websocketfun/callPatient', msg.content);
}

// 项目
function projectListResHandle (msg) {
    store.dispatch('websocket/websocketfun/setprojectList', msg.content);
}

// 停止叫号
function queueInfusionScreenResHandle (msg) {
    store.dispatch('websocket/websocketfun/queueInfusionScreen', msg.content);
}

// 错误
function errorHandle (msg) {

}

export default {
    screenAuthResHandle,
    queueListScreenResHandle,
    queueCallScreenResHandle,
    projectListResHandle,
    queueInfusionScreenResHandle,
    errorHandle
}
